package com.senlingspace.system.service.impl;

import java.util.List;
import com.senlingspace.common.utils.DateUtils;
import com.senlingspace.common.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.senlingspace.system.mapper.SlkjRegistrationMapper;
import com.senlingspace.system.domain.SlkjRegistration;
import com.senlingspace.system.service.ISlkjRegistrationService;

/**
 * 登记机Service业务层处理
 * 
 * @author SenlingSpace
 * @date 2024-07-27
 */
@Service
public class SlkjRegistrationServiceImpl implements ISlkjRegistrationService 
{
    @Autowired
    private SlkjRegistrationMapper slkjRegistrationMapper;

    /**
     * 查询登记机
     * 
     * @param id 登记机主键
     * @return 登记机
     */
    @Override
    public SlkjRegistration selectSlkjRegistrationById(Long id)
    {
        return slkjRegistrationMapper.selectSlkjRegistrationById(id);
    }

    /**
     * 查询登记机列表
     * 
     * @param slkjRegistration 登记机
     * @return 登记机
     */
    @Override
    public List<SlkjRegistration> selectSlkjRegistrationList(SlkjRegistration slkjRegistration)
    {
        PageUtils.startPage();
        return slkjRegistrationMapper.selectSlkjRegistrationList(slkjRegistration);
    }

    /**
     * 新增登记机
     * 
     * @param slkjRegistration 登记机
     * @return 结果
     */
    @Override
    public int insertSlkjRegistration(SlkjRegistration slkjRegistration)
    {
        slkjRegistration.setCreateTime(DateUtils.getNowDate());
        return slkjRegistrationMapper.insertSlkjRegistration(slkjRegistration);
    }

    /**
     * 修改登记机
     * 
     * @param slkjRegistration 登记机
     * @return 结果
     */
    @Override
    public int updateSlkjRegistration(SlkjRegistration slkjRegistration)
    {
        slkjRegistration.setUpdateTime(DateUtils.getNowDate());
        return slkjRegistrationMapper.updateSlkjRegistration(slkjRegistration);
    }

    /**
     * 批量删除登记机
     * 
     * @param ids 需要删除的登记机主键
     * @return 结果
     */
    @Override
    public int deleteSlkjRegistrationByIds(Long[] ids)
    {
        return slkjRegistrationMapper.deleteSlkjRegistrationByIds(ids);
    }

    /**
     * 删除登记机信息
     * 
     * @param id 登记机主键
     * @return 结果
     */
    @Override
    public int deleteSlkjRegistrationById(Long id)
    {
        return slkjRegistrationMapper.deleteSlkjRegistrationById(id);
    }
}
